﻿<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>文档中心</title>
    <meta name="viewport" content="initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link href="/Web/CSS/animate.css" rel="stylesheet" />
    <link rel="stylesheet" href="/Web/CSS/msui.css">
    <link rel="stylesheet" href="/Web/CSS/viewer.min.css">
    <style type="text/css">
        .cs-list .list-block .item-inner {
            padding: 0.6em 0;
        }

        .cs-list li.item-content .item-media {
            padding: 0;
        }

        .list-block .item-inner {
            padding-top: 1em;
            padding-bottom: 1em;
        }

        .cz-list {
            font-size: 0.8em;
        }

        .list-block.cs-list .item-subtitle {
            font-size: 0.7em;
        }

            .list-block.cs-list .item-subtitle.item-pic-mesg {
                color: #999;
            }

        .item-pic-mesg .time {
            margin-left: 1em;
        }

        .item-pic-mesg.item-bj .time {
            margin-left: 0;
            color: #06c;
        }

        .item-pic-mesg.item-bj {
            white-space: normal;
            max-height: 3em;
            overflow: hidden;
        }

        .form-checkbox {
            width: 1.1rem;
            height: 1.1rem;
            position: relative;
            border-radius: 1.1rem;
            border: 1px solid #c7c7cc;
            box-sizing: border-box;
        }

        .list-block .item-after {
            color: transparent;
            max-height: none;
        }

        .list-block.cs-list .label-checkbox .item-media {
            padding: 0;
        }

        .list-block.cs-list label.label-checkbox:active {
            background: transparent;
        }

        .click-show {
            background: #000;
            color: #fff;
            z-index: 200;
        }

            .click-show .title {
                color: #f1f1f1;
            }

            .click-show.bar .button-link {
                color: #fff;
            }

        .bar-click-show {
            z-index: 200;
            background: #eaeaea;
            border-top: 1px solid #d6d6d6;
        }

            .bar-click-show.bar-tab .tab-item {
                color: #333;
            }

        .cs-nomarg-nobor {
            border: none;
            margin-top: -1px;
        }

            .cs-nomarg-nobor > ul > li:hover {
                background: #f5f5f5;
            }
        /*加号模块*/
        ul li {
            list-style: none;
        }

        * {
            margin: 0;
            padding: 0;
        }

        #plus_btn {
            height: 3em;
            width: 3em;
        }

            #plus_btn img {
                height: 3em;
                width: 3em;
                position: fixed;
                right: 0.82rem;
                bottom: 4em;
                z-index: 1000;
            }

        .mod-mask {
            position: fixed;
            width: 100%;
            height: 100%;
            background-color: rgba(240,240,240,.9);
            left: 0;
            top: 0;
            z-index: 1001;
        }

        .mod-body {
            min-width: 320px;
            margin-left: auto;
            margin-right: auto;
            max-width: 720px;
            position: relative;
            z-index: 1002;
        }

            .mod-body > ul {
                position: fixed;
                width: 100%;
                right: 0;
                bottom: 3.2em; /*padding: 0.82rem;*/
                right: 0.82rem;
            }

                .mod-body > ul > li {
                    height: 4em;
                    position: relative;
                }

            .mod-body .mod-li-icon {
                display: block;
                height: 3em;
                margin-top: 0.2rem;
                position: absolute;
                right: 0;
            }

        .mod-li-icon img {
            height: 100%;
            width: auto;
        }

        .mod-body .mod-li-tip {
            float: right; /*margin-right: 1rem; */
            height: 1.4rem;
            line-height: 1.4rem;
            margin-top: 0.4rem;
            border-radius: 4px;
            text-align: center; /*width: 8rem;*/
            font-size: 0.6rem;
            color: #858585;
            background-color: #fff;
            box-shadow: 0px 0px 8px #aaa;
            position: absolute;
            right: 20%;
            padding: 0 1em;
            top: 10%;
        }

        #module_plus {
            display: none;
        }

        .address {
            background-color: #d9d8dd;
            padding-bottom: 2.5rem;
        }

            .address .header {
                background-color: #393a3f;
                line-height: 2.2rem;
                color: #fff;
                font-size: 0.4rem;
                position: relative;
            }

        .back {
            position: absolute;
            left: 0.82rem;
            width: 1rem;
            height: 1rem;
            display: block;
            background-size: auto 100%;
            top: 0.6rem;
            background-position: center center;
            background-repeat: no-repeat;
        }

            .back:hover {
                opacity: .7;
            }

        .search-box {
            height: 2.2rem;
            padding: 0.41rem;
        }

            .search-box .inp-s {
                background-color: #fff;
                border-radius: 4px;
                display: block;
                height: 1.38rem;
                width: 100%;
                font-size: 1em;
                border: none;
                background: #fff url(../images/zoom.png) no-repeat 0.82rem center;
                background-size: 0.8rem auto;
                text-align: left;
                padding-left: 2rem;
                line-height: 1.38rem;
            }

        .selected-per {
            height: 3.82rem;
            background-color: #fff;
            padding: 0.41rem;
        }

            .selected-per li {
                width: 15%;
                float: left;
                text-align: center;
                margin-right: 2%;
            }

                .selected-per li:hover {
                    opacity: .7;
                }

                .selected-per li:nth-of-type(6n) {
                    margin-right: 0;
                }

            .selected-per a {
                width: 100%;
                display: block;
                margin-left: auto;
                margin-right: auto;
            }

            .selected-per img {
                width: 100%;
                height: auto;
                margin-left: auto;
                margin-right: auto;
            }

            .selected-per span {
                font-size: 12px;
                display: block;
                margin-top: 0.5em;
                white-space: nowrap;
                color: #898989;
            }

        .sel-title {
            height: 2.58rem;
            margin-top: 0.82rem;
            padding: 0.41rem;
            border-bottom: #cacacc 1px solid;
            background-color: #fff;
            line-height: 2.58rem;
        }

        .sel-btn {
            display: block;
            text-align: center;
            float: left;
            height: 1.60rem;
            line-height: 1.60rem;
            width: 30%;
            border-radius: 4px;
            border: 1px solid #b2b2b2;
            color: #4e4e4e;
            font-size: 1.2em;
        }
        /*.check input[type="check"]*/
        .check {
            position: relative;
            height: 100%;
            line-height: 1.76rem;
            display: inline-block;
            float: right;
            padding-right: 1.2rem;
            color: #4e4e4e;
        }

            .check input[type="checkbox"] {
                display: none;
            }

        .check-icon {
            display: inline-block;
            height: 0.8rem;
            width: 0.8rem;
            background-image: url(../images/uncheck.png);
            background-size: 100% auto;
            position: absolute;
            top: 50%;
            right: 0;
            transform: translate(0,-50%);
            -webkit-transform: translate(0,-50%);
        }

        .check input[type="checkbox"]:checked + .check-icon {
            background-image: url(../images/checked.png);
        }

        .add-lists { /*padding: 0.41rem;*/
            margin-top: 0.82rem;
            background-color: #fff;
        }

        .arr {
            text-indent: -9999rem;
            display: block;
            width: 0.6rem;
            height: 0.6rem;
            background: url(../images/arr-l.png) center center no-repeat;
            background-size: auto 100%;
            position: absolute;
            left: 0.41rem;
            top: 0.83rem; /*transform:translate(0,-50%);*/
        }
        /*.arr-l{ background-image: url(../images/arr-l.png)}*/
        .arr-d {
            background-image: url(../images/arr-d.png);
            background-size: 100% auto;
        }

        .add-li {
            line-height: 2.26rem;
            position: relative;
            background-color: #fff;
        }

            .add-li .check {
                position: absolute;
                right: 0.41rem;
                top: 0;
            }

                .add-li .check .check-icon {
                    top: 0.73rem;
                    transform: none;
                    -webkit-transform: none;
                }

            .add-li a {
                display: block;
                padding-left: 1.5rem;
                color: #4e4e4e;
                height: 2.26rem;
                border-bottom: 1px solid #cacacc;
            }

                .add-li a:hover {
                    background-color: #f7f7f7;
                }

        .sublis .add-li a {
            padding-left: 2.5rem;
        }

        .sublis .add-li .arr {
            left: 1rem;
        }

        .add-count {
            color: #8f8f8f;
            font-size: 0.7em;
            float: right;
            padding-right: 1.5rem;
        }

        .subper a {
            padding-left: 0rem;
        }

        .subper .add-li {
            padding: 0;
        }

            .subper .add-li a {
                height: 2.5rem;
                padding-left: 0.8rem;
                border-bottom: 1px solid #cacacc;
            }

            .subper .add-li .mes-icon, .subper .add-li .mess-r {
                margin-top: 0.4rem;
            }

        .add .footer {
            background-color: #f7f7f7;
            border-top: 1px solid #b0b0b0;
            padding: 0.41rem;
        }

        .add-btn {
            height: 100%;
        }

            .add-btn li {
                height: 100%;
                width: 48%;
                float: left;
            }

                .add-btn li a {
                    display: block;
                    height: 100%;
                    text-align: center;
                    border: 1px solid #c9c9c9;
                    border-radius: 4px;
                    background-color: #fff;
                    height: 1.6rem;
                    line-height: 1.6rem;
                    font-size: 1.4em;
                }

                    .add-btn li a:hover {
                        opacity: .7;
                    }

        .cancel {
            margin-right: 4%;
        }

        .add-btn .ensure a {
            background-color: #33cd31;
            border: none;
            height: 1.66rem;
            line-height: 1.66rem;
            color: #fff;
        }

        .detail-title h1 {
            text-align: left;
            padding-left: 1.5rem;
        }

        .user-block {
            position: relative;
        }

            .user-block .uname {
                width: 2.5rem;
                display: block;
                text-align: center;
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%,-50%);
                -webkit-transform: translate(-50%,-50%);
                color: #fff;
            }

        .uname img {
            width: 100%;
            height: auto;
            margin-bottom: 0.4rem;
        }

        .detail-lis {
            margin-top: 1rem;
            border-top: 1px solid #cccccc;
        }

            .detail-lis li {
                height: 2.3rem;
                line-height: 2.3rem;
                border-bottom: 1px solid #cccccc;
                background-color: #fff;
                padding-left: 0.41rem;
                padding-right: 0.41rem;
            }

                .detail-lis li:hover {
                    background-color: #f7f7f7;
                }

        .label {
            width: 35%;
            display: inline-block;
            font-size: 1.3em;
            color: #484848;
        }

        .detail {
            width: 65%;
            display: inline-block;
            font-size: 0.9em;
            color: #8b8b8b;
        }

        .btn-phone {
            display: block;
            width: 90%;
            border-radius: 4px;
            background-color: #33cd31;
            text-align: center;
            height: 2.3rem;
            line-height: 2.3rem;
            color: #fff;
            font-size: 1.3em;
            margin-left: auto;
            margin-right: auto;
            margin-top: 1.5rem;
        }

            .btn-phone:hover {
                opacity: .7;
            }

            .btn-phone img {
                height: 1rem;
                vertical-align: middle;
            }

        /***头部菜单***/
        #m-horizontalListing {
            overflow: hidden;
            width: auto;
            position: relative;
            z-index: 1;
        }

        .h-listing {
            -webkit-transition: -webkit-transform 300ms ease-in-out;
            -webkit-transform-style: preserve-3d;
            -webkit-backface-visibility: hidden;
            overflow: hidden;
            display: block;
            white-space: nowrap;
            position: relative;
            z-index: 5;
            margin: 0;
            list-style: none;
            padding: 0;
            display: -webkit-box;
            display: -moz-box;
        }

            .h-listing.default {
                width: 9999px;
            }

        .listing {
            display: inline-block;
            padding: 0;
            text-align: center;
            vertical-align: top;
        }

        .listing-thumb-link {
            display: block;
            -webkit-transform: perspective(0) rotateY(0) translateZ(200px);
            text-align: center;
            width: auto;
            -webkit-box-shadow: 0 8px 6px -6px #e0e0e0;
            -moz-box-shadow: 0 8px 6px -6px #e0e0e0;
            box-shadow: 0 8px 6px -6px #e0e0e0;
            -webkit-border-radius: 4px;
            border-radius: 4px;
            padding: 0 1.5em 0 .5em;
            color: #666;
            font-size: .8em;
            height: 2.6em;
            line-height: 2.6em;
            position: relative;
        }

            .listing-thumb-link:after {
                width: 0;
                height: 0;
                border-top: 1.4em solid transparent;
                border-left: 1em solid #eee;
                border-bottom: 1.3em solid transparent;
                display: inline;
                content: "";
                position: absolute;
                right: 5px;
                z-index: 5;
            }

            .listing-thumb-link:before {
                width: 0;
                height: 0;
                border-top: 1.4em solid transparent;
                border-left: 1em solid #d6d6d6;
                border-bottom: 1.3em solid transparent;
                display: inline;
                content: "";
                position: absolute;
                right: 4px;
                z-index: 5;
            }

        .listing-title {
            margin: 0;
            text-align: center;
            font-size: 13px;
            font-weight: 400;
            margin-top: 5px;
            position: relative;
        }


        .h-listing-holder {
            background: #eee;
            overflow: hidden;
            border-bottom: 1px solid #eaeaea;
            position: relative;
            z-index: 100;
        }

        .listing-thumb {
            width: 50px;
        }

        .bar-click-show.bar-tab .menudisabled {
            color: #b7b8b7;
        }

        .ms-controller {
            visibility: hidden;
        }
    </style>


    <script src="/Web/js/jquery-1.11.1.min.js"></script>
    <script src="/Web/js/viewer-jquery.min.js"></script>
    <script src="/Web/js/layer/layer.js"></script>
    <script src="/Web/js/avalon1.47.js"></script>
    <script src="/Web/js/SZHLCommon.js"></script>
    <script>
        window.onload = init;
        var viewimg;
        function init() {
            var plus_btn = document.getElementById("plus_btn");
            var module_plus = document.getElementById("module_plus")
            plus_btn.onclick = function () { module_plus.style.display = "block" }
            module_plus.onclick = function () { module_plus.style.display = "none" }
        }
        function inittp() {
            viewimg = $('#jq22').viewer({
                url: 'data-original',
            });
        }
        var model = avalon.define({
            $id: "indexM",
            wjjData: [],
            wjData: [],
            imgdata: [],
            urlData: [],
            seluser: "",
            selusername: "",
            gxdata: [],
            showtype: "0",
            wjjpath: "",
            no: "",
            isadd: "",
            type: "",
            Pathdata: [],
            UserInfo: {},
            isQX: false,
            selWJ: [],
            qycode: ComFunJS.getCookie("qycode"),
            getsrc: function (item) {//图片真实路径
                if (item.type == 'folder') {
                    return "/Web/images/qywd/file1.png";
                } else {
                    if (ComFunJS.isPic(item.FileExtendName)) {
                        return ComFunJS.getfile(item.ID) + "&width=40&height=40";
                    }
                    else {
                        return " /Web/images/qywd/" + item.FileExtendName + ".png";
                    }
                }

            },
            GetUserData: function (callbact) {
                $.getJSON('/adminapi/ExeAction/GETUSERINFO', {}, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        model.UserInfo = resultData.Result;
                        ComFunJS.setCookie('qycode', resultData.Result4.Code + "," + resultData.Result4.secret);
                        ComFunJS.setCookie("user", resultData.Result.User.username);
                        if (callbact) {
                            return callbact.call(this);
                        }
                    }
                })
            }, //获取用户信息
            SelectLYType: function (username, selusername) {
                model.Pathdata.clear();
                model.showtype = "1";
                $.getJSON('/adminapi/ExeAction/GETNBSHARELIST', {
                    P1: username
                }, function (resultData) {//P1为个人文件夹
                    resultData.Result.forEach(function (item) {
                        item.issel = false;
                        item.type = "folder";
                    })
                    resultData.Result1.forEach(function (item) {
                        item.issel = false;
                        item.type = "file";
                    })
                    model.wjjData = resultData.Result;
                    model.wjData = resultData.Result1;
                    model.seluser = username;
                    model.selusername = selusername;
                    model.Pathdata.splice(1, model.Pathdata.length - 1)
                })

            },
            fdtp: function (obj) {
                return;
                var str = $(obj).attr("urlid");
                if (!str) {

                    $(".mall_pcp").each(function (index, ele) {
                        if ($(ele).attr("img")) {
                            $(ele).attr("urlid", model.urlData.length);
                            model.urlData.push($(ele).attr("img"));
                        }
                    });
                    myPhotoBrowserCaptions = $.photoBrowser({
                        photos: model.urlData,
                        theme: 'dark'
                    });
                }

                myPhotoBrowserCaptions.open($(obj).attr("urlid") * 1);
            },
            vieww: function (el) {
                model.selWJ.clear();//清除选择项
                var newpath = el.$model;
                model.Pathdata.forEach(function (path) {
                    path.active = false;
                })
                newpath.active = true;
                model.Pathdata.push(newpath);
                model.GetListData(el.ID);

            },
            GetListData: function (PID) {
                $.getJSON("/adminapi/ExeActionAuth/GETLISTDATA", { P1: PID, P2: "Y", itemtype: model.type }, function (r) {
                    if (r.ErrorMsg == "") {
                        r.Result.forEach(function (item) {
                            item.type = "wjj";
                            item.issel = false;
                        })
                        r.Result1.forEach(function (item) {
                            item.type = "file";
                            item.issel = false;
                        })
                        model.wjjData = r.Result;
                        model.wjData = r.Result1;
                        if (model.wjjData.length == 0 && model.wjData.length == 0) {
                            model.no = "Y";
                        }
                        if (r.Result2) {
                            model.isadd = r.Result2;
                        }
                        $('#imgUI').empty();
                        if (viewimg && viewimg.data('viewer')) {
                            viewimg.data('viewer').destroy();
                        }
                        for (var i = 0; i < r.Result1.length; i++) {
                            if (ComFunJS.isPic(r.Result1[i].FileExtendName)) {
                                var dom = $('<li><img id="slt' + r.Result1[i].ID + '" data-original="' + ComFunJS.getfile(r.Result1[i].ID) + '" src="' + model.getsrc(r.Result1[i]) + '" alt="图片1"></li>');
                                $('#imgUI').append(dom);
                            }
                        }
                        if ($('#imgUI').find('li').length > 0) {
                            viewimg = $('#imgUI').viewer({
                                url: 'data-original',
                            });
                        }

                    }
                })
            },
            gopath: function (path) {
                model.selWJ.clear();//清除选择项
                $(".icheckbox_square-blue").removeClass("checked")//清除所有样式
                model.wjData = [];
                model.wjjData = [];
                model.GetListData(path.ID);
                for (i = model.Pathdata.size() - 1; i >= 0; i--) {
                    if (model.Pathdata[i].ID != path.ID) {
                        model.Pathdata.pop(model.Pathdata[i])
                    } else {
                        model.Pathdata[i].active = true;
                        return;
                    }
                }

            },//目录链接
            viewwxx: function () {
                if (model.selWJ.size() != 1) {
                    ComFunJS.winwarning("请选择一个文件！");
                    return;
                }
                if (ComFunJS.xstp(model.selWJ[0].FileExtendName)) {
                    model.fdtp($("#wj" + model.selWJ[0].ID));
                } else if (model.selWJ[0].YLUrl) {
                    window.location = model.selWJ[0].YLUrl;
                }
                if (model.selWJ[0].FileExtendName.toLowerCase() == "mp4") {
                    window.location = "/Web/Html/Tools/showvideo.html?md5=" + model.selWJ[0].FileMD5;
                }

            },
            DownLoadFile: function () {
                if (model.selWJ.size() != 1) {
                    ComFunJS.winwarning("请选择一个文件！");
                    return;
                }
                window.location = ComFunJS.getfile(model.selWJ[0].ID);

            },
            viewfile: function (item) {
                ComFunJS.viewfile(this, item);
            },//文件查看方法
            initFile: function () {
                var fileapi = ComFunJS.getRoot();
                ComFunJS.loadJs("/Web/qj_upload.js", function () {
                    new QJUpload({
                        uploadButtton: 'qjupload',
                        fileapiurl: fileapi,
                        usercode: model.qycode.split(',')[0],
                        secret: model.qycode.split(',')[1],
                        upinfo: "上传组件",
                        webupconfig: {
                            fileNumLimit: 5,
                        },
                        width: "80%",
                        left: "10%",
                        closeupwin: function (fileData, dom) {
                            var nowfolderid = model.Pathdata[model.Pathdata.length - 1].ID;
                            $.getJSON('/adminapi/ExeAction/ADDFILE', { "P1": fileData, "P2": nowfolderid }, function (result) {
                                if (result.ErrorMsg == "") {
                                    var filedata = result.Result;//给filedata赋值,供页面使用
                                    filedata.forEach(function (item) {
                                        item.issel = false;
                                        item.type = "file";
                                    })
                                    model.wjData.pushArray(filedata)

                                }
                            })
                        }
                    });
                })
            },
            LoadMenu: function (el) {
                model.wjData.forEach(function (item) {
                    if (item.ID == el.ID) {
                        el.issel = !el.issel;
                    } else {
                        item.issel = false;
                    }
                })

                if (el.issel) {

                    model.selWJ.clear();
                    model.selWJ.push(el);
                    $(".click-show").show();
                    $(".bar-click-show").show();
                } else {
                    model.selWJ.clear();
                    $(".click-show").hide();
                    $(".bar-click-show").hide();
                }

            }, scwj: function () {
                if (model.type == '2' || (model.type == '1' && model.isadd == 'true')) {
                    $("#file").trigger("click");
                }
                else {
                    ComFunJS.winwarning("您没有上传权限！");
                }
            }, hideheader: function () {
                $(".click-show").hide();
                $(".bar-click-show").hide();
                model.wjData.forEach(function (item) {
                    item.issel = false;
                })

            }, DelFile: function () {
                if (model.selWJ.size() == 0) {
                    ComFunJS.winwarning("请选择要删除的文件");
                    return;
                }
                var delmodel = model.selWJ.$model;
                var flag = false;
                model.selWJ.forEach(function (wjitem) {
                    if (wjitem.type == "file") {
                        flag = true;
                    }
                })
                var msg = "";
                if (flag) {
                    msg = "如果删除目录会删除目录下的所有文件,";
                }
                $.confirm(msg + "确认要删除选中项吗", function () {
                    $.getJSON('/adminapi/ExeActionAuth/DELFLODER', {
                        P1: JSON.stringify(delmodel)
                    }, function (resultData) {//P1为个人文件夹
                        if (resultData.ErrorMsg == "") {
                            ComFunJS.winsuccess("删除成功");
                            model.wjData.remove(model.selWJ[0])
                        } else {

                        }
                    })
                })
            }, ShareWJ: function () {
                if (model.selWJ) {
                    var type = model.selWJ[0].FileExtendName ? "file" : "wj";
                    $.getJSON('/adminapi/ExeActionAuth/ADDSHARECODE', {
                        "P1": model.selWJ[0].ID, "P2": type, url: "http://" + location.host + "/Web/Html/Tools/share.html"
                    }, function (result) {
                        if (result.ErrorMsg == "") {
                            location.href = "fileshare.html?shareid=" + result.Result.ID;
                        } else {

                            ComFunJS.winwarning("分享失败，请稍后重试");
                        }
                    })
                } else {
                    ComFunJS.winwarning("请选中要分享的文件");
                }
            },
        });



        var myPhotoBrowserCaptions;

        avalon.ready(function () {


            var strType = ComFunJS.getQueryString("type");
            if (!strType) {
                strType = "1";
            }
            model.type = strType;

            var filecode = ComFunJS.getQueryString("filecode");
            if (filecode) {
                ComFunJS.setCookie("filecode", filecode);
            }
            var typename = "企业空间";
            if (strType == "2") {
                typename = "个人空间";
            }
            if (model.type != "3") {
                model.Pathdata.push({
                    ID: model.type, Name: typename, FolderType: model.type, Remark: model.type, PFolderID: "0", FolderLev: "0", active: true
                })
            } else {
                //获取共享人员
                $.getJSON("/adminapi/ExeActionAuth/GETNBGXLY", { P1: "" }, function (r) {
                    if (r.ErrorMsg == "") {
                        model.gxdata = r.Result;
                    }
                });
            }

            //$(".tab-item").removeClass("active");
            //$(".tab-item").eq(strType * 1 - 1).addClass("active");
            model.GetListData(model.type);
            model.GetUserData(function () {
                model.initFile();

            })
          

        })

        //function UploadLoad() {
        //    var str = strId;
        //    if (document.getElementById("file").files.length > 0) {
        //        var formData = new FormData();
        //        formData.append("upFile", document.getElementById("file").files[0]);
        //        $.ajax({
        //            url: "/API/VIEWAPI.ashx?ACTION=XTGL_UPLOADFILES&P1=" + str + "&r=" + Math.random(),
        //            type: "POST",
        //            data: formData,
        //            /**
        //            *必须false才会自动加上正确的Content-Type
        //            */
        //            contentType: false,
        //            /**
        //            * 必须false才会避开jQuery对 formdata 的默认处理
        //            * XMLHttpRequest会对 formdata 进行正确的处理
        //            */
        //            processData: false,
        //            success: function (result) {
        //                var r = $.parseJSON(result);
        //                if (r.ErrorMsg == "") {
        //                    document.getElementById("file").outerHTML = document.getElementById("file").outerHTML;
        //                    $("#file").change(function () {
        //                        UploadLoad(str);
        //                    });
        //                    if (r.Result1.length == 0) {
        //                        r.Result.forEach(function (item) {
        //                            item.issel = false;
        //                            item.type = "file";
        //                        })
        //                        model.wjData.push(r.Result[0]);
        //                    }
        //                    ComFunJS.winsuccess("上传成功！");
        //                }
        //            }
        //        });
        //    }
        //}
    </script>
</head>
<body class="ms-controller" ms-controller="indexM">
    <div class="page-group">
        <div class="page page-current" id="pageindex1">
            <div class="content" style="padding-bottom:3em;">

                <!-- 点击显示文件夹名 -->
                <div class="h-listing-holder">
                    <ul class="h-listing" id="h-listing">
                        <li class="listing" ms-if="type=='3'"><a class="listing-thumb-link external" href="/Web/Html/indexM.html?type=3">共享文件</a></li>
                        <li class="listing" ms-if="type=='3'&&seluser" ms-click="SelectLYType(seluser,selusername)"><a class="listing-thumb-link external">{{selusername}}</a></li>
                        <li class="listing" ms-repeat-path="Pathdata" ms-click="gopath(path)">
                            <a class="listing-thumb-link external">
                                {{path.Name}}
                            </a>
                        </li>
                    </ul>
                </div>
                <!-- 分类 -->
                <div class="list-block cs-list cs-nomarg-nobor media-list">
                    <ul>
                        <div ms-if="showtype=='0'">
                            <li ms-repeat-el="gxdata" ms-click="SelectLYType(el.CRUser,el.UserRealName)">
                                <div class="item-content">
                                    <div class="item-media">
                                        <img src="/WEB/Images/qywd/file1.png" width="50">
                                    </div>
                                    <div class="item-inner" style="line-height:2.2em">
                                        {{el.UserRealName}}
                                    </div>
                                </div>
                            </li>
                        </div>

                        <li ms-repeat-el="wjjData" ms-on-click="vieww(el)">
                            <div class="item-content">
                                <div class="item-media">
                                    <img src="/WEB/Images/qywd/file1.png" width="50">
                                </div>
                                <div class="item-inner" style="line-height:2.2em">
                                    {{el.Name}}
                                </div>
                            </div>
                        </li>
                        <li ms-repeat-el="wjData">
                            <div class="item-content">
                                <div class="item-media"  ms-on-click="viewfile(el)">
                                    <img ms-if="ComFunJS.isPic(el.FileExtendName)" class="mall_pcp" ms-attr-id="'wj'+el.ID" style="height:40px;width:40px" ms-attr-src="getsrc(el)" ms-attr-data-original="{{ComFunJS.getfile(el.ID)}}" width="50">
                                    <img ms-if="!ComFunJS.isPic(el.FileExtendName)" ms-attr-src="/Web/Images/qywd/{{el.FileExtendName}}.png" onerror="javascript: this.src = '/Web/Images/qywd/file.png'" width="50" />

                                </div>
                                <div class="item-inner">
                                    <div class="item-title-row">
                                        <div class="item-title">{{el.Name}}.{{el.FileExtendName}}</div>
                                    </div>
                                    <div class="item-subtitle item-pic-mesg"><span class="size"> {{ComFunJS.converfilesize(el.FileSize)}}</span><span class="time">{{el.CRDate|date('yyyy-MM-dd HH:mm')}}</span></div>
                                </div>
                                <div class="item-after" style="margin-right:1em;">
                                    <label class="label-checkbox">
                                        <input type="checkbox" name="checkbox" ms-attr-id="el.ID" ms-attr-checked="el.issel" ms-change="LoadMenu(el)">
                                        <div class="item-media"><i class="icon icon-form-checkbox"></i></div>
                                    </label>
                                </div>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <!-- 底部切换 -->
            <nav class="bar bar-tab">
                <a class="tab-item external " ms-class-1="active:type=='1'" href="/Web/Html/IndexM.html">
                    <span class="icon icon-home"></span>
                    <span class="tab-label">企业知识库</span>
                </a>
                <a class="tab-item external" ms-class-1="active:type=='2'" href="/Web/Html/indexM.html?type=2">
                    <span class="icon icon-me"></span>
                    <span class="tab-label">个人文档</span>
                </a>
                <a class="tab-item external" ms-class-1="active:type=='3'" href="/Web/Html/indexM.html?type=3">
                    <span class="icon icon-share"></span>
                    <span class="tab-label">共享文档</span>
                </a>
                <!--<a class="tab-item external" href="/View_Mobile/UI/UI_QYWD_SC.html">
                    <span class="icon icon-star"></span>
                    <span class="tab-label">我的收藏</span>
                </a>-->
            </nav>

            <!-- 选中按钮显示头部 -->
            <header class="bar bar-nav click-show animated fadeInDown" style="display:none">
                <a class="button button-link button-nav pull-left external" ms-click="hideheader()">
                    <span class="icon icon-left"></span>
                    返回
                </a>
                <!--<a class="button button-link button-nav pull-right checkAll external" ms-click="CheckALL()" style="margin-right:1em">
                    {{model.isQX?"取消全选":"全选"}}
                </a>-->
                <h1 class="title">已选<span>({{model.selWJ.size()}})</span></h1>
            </header>
            <!-- 选中按钮显示底部 -->
            <nav class="bar bar-tab bar-click-show animated fadeInUp" style="display:none;padding:0 2em">
                <a class="tab-item external" ms-click="ShareWJ()">
                    <span class="icon icon-share"></span>
                    <span class="tab-label">分享</span>
                </a>
                <a class="tab-item external  " ms-click="DownLoadFile()">
                    <span class="icon icon-download"></span>
                    <span class="tab-label">下载</span>
                </a>
                <!--<a class="tab-item external active" ms-class-1="menudisabled:selWJ.size()==0||!(ComFunJS.xstp(selWJ[0].FileExtendName)||selWJ[0].FileExtendName.toLowerCase()=='mp4'||(selWJ[0].ISYL=='Y'&&selWJ[0].YLUrl))" ms-click="viewwxx()">
                    <span class="icon icon-star"></span>
                    <span class="tab-label">{{selWJ[0].FileExtendName.toLowerCase()=='mp4'?"播放":"预览"}}</span>
                </a>-->
                <a class="tab-item external active" ms-if="type==2" ms-click="DelFile()">
                    <span class="icon icon-remove"></span>
                    <span class="tab-label">删除</span>
                </a>
            </nav>
            <span id="plus_btn" ms-if="type==2"><img src="/Web/images/plus-plus.png" height="188" width="188" alt="" style=""></span>
            <div class="module_plus" id="module_plus">
                <div class="mod-mask"></div>

                <div class="mod-body">

                    <ul>


                        <li style="display:none">
                            <a href="###" class="mod-li-icon"><img src="/Web/images/c-wjj.png" height="188" width="188" alt=""></a>
                            <div class="mod-li-tip">新建文件夹</div>
                        </li>
                        <li ms-if="type==2">
                            <a href="###" class="mod-li-icon"><img src="/Web/images/c-wj.png" height="188" width="188" alt=""></a>
                            <div class="mod-li-tip" id="qjupload">上传文件</div>
                            <!--<input type="file" style="display:none;" id="file" onchange="UploadLoad()">-->
                        </li>

                    </ul>
                </div>
            </div>

            <ul id="imgUI" style="display:none"></ul>

        </div>
    </div>


</body>

</html>
